package com.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * (Home)表实体类
 *
 * @author makejava
 * @since 2021-09-29 15:27:46
 */
@SuppressWarnings("serial")
public class Home extends Model<Home> {
    //id
    @TableId(value = "id", type = IdType.INPUT) //这种方式是主键手动输入
    private Integer id;
    //户主名称
    private String householder;
    //联系方式
    private String phone;
    //栋数
    private String dong;
    //楼层
    private String floor;
    //描述
    private String remark;
    //创建时间
    private Date createDate;
    //所属小区id
    private int communityId;
    //房产名称
    private String homeName;
    //房号
    private String roomNum;
    //房间数
    private String homeNum;
    //入住时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date resideDate;

    //所属小区
    @TableField(exist = false)
    private String communityName;
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date overDate;

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getOverDate() {
        return overDate;
    }

    public void setOverDate(Date overDate) {
        this.overDate = overDate;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getHouseholder() {
        return householder;
    }

    public void setHouseholder(String householder) {
        this.householder = householder;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getDong() {
        return dong;
    }

    public void setDong(String dong) {
        this.dong = dong;
    }

    public String getFloor() {
        return floor;
    }

    public void setFloor(String floor) {
        this.floor = floor;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getcommunityName() {
        return communityName;
    }

    public void setcommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getHomeName() {
        return homeName;
    }

    public void setHomeName(String homeName) {
        this.homeName = homeName;
    }

    public String getRoomNum() {
        return roomNum;
    }

    public void setRoomNum(String roomNum) {
        this.roomNum = roomNum;
    }

    public String getHomeNum() {
        return homeNum;
    }

    public void setHomeNum(String homeNum) {
        this.homeNum = homeNum;
    }

    public Date getResideDate() {
        return resideDate;
    }

    public void setResideDate(Date resideDate) {
        this.resideDate = resideDate;
    }

    public int getCommunityId() {
        return communityId;
    }

    public void setCommunityId(int communityId) {
        this.communityId = communityId;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Home{" +
                "id=" + id +
                ", householder='" + householder + '\'' +
                ", phone='" + phone + '\'' +
                ", dong='" + dong + '\'' +
                ", floor='" + floor + '\'' +
                ", remark='" + remark + '\'' +
                ", createDate=" + createDate +
                ", communityid='" + communityId + '\'' +
                ", communityName='" + communityName + '\'' +
                ", houseName='" + homeName + '\'' +
                ", roomNum='" + roomNum + '\'' +
                ", homeNum='" + homeNum + '\'' +
                ", resideDate=" + resideDate +
                ", beginDate=" + beginDate +
                ", overDate=" + overDate +
                '}';
    }
}

